package com.itheima.threadmethod;

public class ThreadDemo {
    public static void main(String[] args) {
        //创建MyRunnable的对象
        MyRunnable mr=new MyRunnable();

        //创建线程的对象
        Thread t1=new Thread(mr,"飞机");
        Thread t2=new Thread(mr,"坦克");

        //设置线程优先级
        t1.setPriority(1);
        t2.setPriority(10);

        t1.start();
        t2.start();
    }
}
